﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CSharpDemo.Properties;

namespace CSharpDemo
{
    public partial class Player : Form
    {
        private const string basePath = @"E:\SOFT\mp3\";
        public Player()
        {
            InitializeComponent();
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void pictureBox1_MouseEnter(object sender, EventArgs e)
        {
            pictureBox1.Image = Resources.icon_close_hover;
        }

        private void pictureBox1_MouseLeave(object sender, EventArgs e)
        {
            pictureBox1.Image = Resources.icon_close;
        }

        private void Player_Load(object sender, EventArgs e)
        {

        }

        private void pictureBox2_MouseLeave(object sender, EventArgs e)
        {
            pictureBox2.Image = Resources.button_blue_first;
        }

        private void pictureBox2_MouseEnter(object sender, EventArgs e)
        {
            pictureBox2.Image = Resources.button_grey_first;
        }

        private void pictureBox3_Click(object sender, EventArgs e)
        {

        }

        private void pictureBox3_MouseEnter(object sender, EventArgs e)
        {
            pictureBox3.Image = Resources.button_grey_play;
        }

        private void pictureBox3_MouseLeave(object sender, EventArgs e)
        {

            pictureBox3.Image = Resources.button_blue_play;
        }

        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string music = basePath + listBox1.Text;
            mediaPlayer.URL = music;
            mediaPlayer.Ctlcontrols.play();
        }

        private void pictureBox4_MouseLeave(object sender, EventArgs e)
        {
            pictureBox4.Image = Resources.button_blue_stop;
        }

        private void pictureBox4_MouseEnter(object sender, EventArgs e)
        {
            pictureBox4.Image = Resources.button_grey_stop;
        }

        private void pictureBox5_MouseEnter(object sender, EventArgs e)
        {
            pictureBox5.Image = Resources.button_blue_last;

        }

        private void pictureBox5_MouseLeave(object sender, EventArgs e)
        {
            pictureBox5.Image = Resources.button_grey_last;
        }
    }
}
